export const rules = {
  name: [{
    required: true,
    message: "please enter name",
    trigger: "blur"
  }],
  attention_name: [{
    required: true,
    message: "please enter attention_name",
    trigger: "blur"
  }],
  email: [{
    required: true,
    message: "please enter email",
    trigger: "blur"
  }],
  tel: [{
    required: true,
    message: "please enter tel",
    trigger: "blur"
  }],
  address: [{
    required: true,
    message: "please enter address",
    trigger: "blur"
  }],
  currency: [{
    required: true,
    message: "please enter currency",
    trigger: "blur"
  }],
  credit_term_type: [{
    required: true,
    message: "please enter credit_term_type",
    trigger: "blur"
  }],
  credit_term: [{
    required: true,
    message: "please enter credit_term",
    trigger: "blur"
  }]
};

export function Model(
  credit_term = 1,
  credit_term_type = "Day",
  currency = "sgd",
  address = "",
  tel = "",
  email = "",
  attention_name = "",
  name = "",
) {
  this.credit_term = credit_term
  this.credit_term_type = credit_term_type;
  this.currency = currency;
  this.address = address;
  this.tel = tel;
  this.email = email;
  this.attention_name = attention_name;
  this.name = name;
}